//utf-8
//点击新增按钮 事件跳转至 新增页面
function packageInformation(cooperorgCode,cooperorgName){
	
	var obj={"text":"[合作机构]"+cooperorgName+"__"+'持有债权包信息',"url":contextRootPath+'/tCMmSubsidiary/prepareExecute/toBillPackage?cooperorgCode=' + cooperorgCode + "&cooperorgName="+cooperorgName};

	parent.showObj(obj);
}




//删除 事件
function deleteData(){
	var v_ids = iframe.iframeObj["table"].getSelectedIds().join(",");
	//如果没有选中 数据则
	if(v_ids == ""){
		alert("请选择待删除的数据！");
		return;
	}
	if(confirm("您确认要删除选择的数据吗？")){
        $.ajax({
            type:"POST",
            dataType : "json",
            url:contextRootPath+"",
            success:function(msg){
            	alert(msg.msg);
            	var v_status = msg.status;
            	//删除成功后
            	if(v_status.indexOf('ok') >-1){
            		iframe.iframeObj["table"].removeSelectedRow();
            	}
            	
            	
            }
        });
    }
}

function packageCredit(cooperorgName, cooperorgCode, packageName, contractCode){
	
	var obj={"text":"[合作机构]"+cooperorgName+"__"+"[债权包]"+packageName+"(合约编号:"+contractCode+')__持有债权明细',"url":contextRootPath+'/tCMmSubsidiary/prepareExecute/toBillPackageCredit?cooperorgCode=' + cooperorgCode+'&packageName='+packageName};
	parent.showObj(obj);
}

function packageOrgCredit(cooperorgName, cooperorgCode){
	
	var obj={"text":"[合作机构]"+cooperorgName+"__"+'持有债权明细',"url":contextRootPath+'/tCMmSubsidiary/prepareExecute/toBillPackageCredit?cooperorgCode=' + cooperorgCode};
	parent.showObj(obj);
}


